﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brouteforce.utilities {
    public static class Randoms{
        private static Random random = new Random(42);

        /// <summary>
        /// </summary>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <returns>
        /// random int between min and max including min and max
        /// ex: Between(1,5) can be any of [1,2,3,4,5]
        /// </returns>
        public static int Between(int min, int max){
            return random.Next(min, max+1);
        }

        public static bool IsLucky(double probability){
            return random.NextDouble() <= probability;
        }

        public static void Reseed(){
            random = new Random();
        }
    }
}
